<?php
$http = new Swoole\Http\Server("location", 9501);
$http->on('request', function ($request, $response) {
    echo "请求" . rand(1000, 9999) . PHP_EOL;
    \Swoole\Coroutine::sleep(50);
    $response->end("<h1>Hello Swoole. #" . rand(1000, 9999) . "</h1>");
});
$http->start();
